/*Engine
DH will use this over archaic functions
Engine will consist of several things
	VarEngine will be
		Storing Layers
		Storing RoomHeaders
		Storing EnemyDefs
	Engine will be
	    Variable loading of layers
		Variable Loading of RoomHeaders
		Variable loading of EnemyDefs



*/
#ifndef ENGINE_H
#define ENGINE_H
#include "GBAMethods.h"
#include "nRoomBuff.h"
#include "GameStructures.h"
#include "GameType.h"
#include "Globals.h"
struct VarEngine{

unsigned char          fGbuf[0x8000];
long        PcPalMem[0x200];
unsigned char          BGBuf[0x8000];
RHeader* RoomHeader; 
nRoomBuff* Layer[5];
nEnemyList* Creatures[3];
gTileData RoomTilesets[0x80];

long gScrolls[0xC];

tTSA TSA;
	enum{
	FOREGROUND=0,
	LEVEL,
	BACKLAYER,
	BACKGROUND,
	CLIPDATA
	};
};
enum{
LOADHEADER=0
};
class Engine: 
	public GBAMethods,public GameType{
public:

VarEngine Members;
Engine();
int LoadSpecialEffects(long EffectNum);
~Engine();
void OpenFile(char* path);
void CloseFile();
void OpenFile();
void LoadHeader(long offset);
FILE* oFP();
int GetTileset(int Area,u8 Tileset);
private:
char* fileloc;
FILE* fp;
};
#endif